package org.nowcoder.huawei.c100;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 48: 分配土地
 */
public class HC048 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] vars = br.readLine().split(" ");
        int n = Integer.parseInt(vars[0]);
        int m = Integer.parseInt(vars[1]);

        int[][] land = new int[n][m];
        for (int i = 0; i < n; i++) {
            String[] s = br.readLine().split(" ");
            for (int j = 0; j < m; j++) {
                land[i][j] = Integer.parseInt(s[j]);
            }
        }
        solve(land, n, m);
    }

    public static void solve(int[][] land, int n, int m) {
        int[][] minPostion = new int[501][2];
        int[][] maxPostion = new int[501][2];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {

            }
        }
    }
}
